/*
Name: Kabir Kang
File: cardtest4.c
Date: 7/13/14
Summary: tests feast card. Checks if game is initialized, if the card is used and if the correct number of coins are budgeted.
 */
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"

int main(int argc, char * argv[]) {

	int seed = 100;
	int numPlayer = 2;
	int k[10] = { adventurer, council_room, feast, gardens, mine, remodel, smithy, village, baron, great_hall };
	int bonus = 0;
	struct gameState g;
	int effect, preCoins, init;

	init = initializeGame(numPlayer, k, seed, &g);

	preCoins = g.coins;

	if (init == 0)
	{
		printf("feast: PASS game initialized \n");
	}
	else
	{
		printf("feast: FAIL game failed to initialize \n");
	}

	printf("Coins before the feast effect: %d\n", g.coins);

	effect = cardEffect(feast, 0, 0, 0, &g, 1, &bonus);
	if (effect == 0)
	{
		printf("feast: PASS feast used");
	}
	else
	{
		printf("feast: FAIL feast effect failed \n");
	}

	if (g.coins = preCoins + 5)
	{
		printf("feast: PASS when 5 coins are added \n");
	}
	else
	{
		printf("feast: FAIL when 5 coins are not added \n");
	}
	

	printf("Coins after feast effect: %d\n", g.coins);

	return 0;
}
